char *e1430_get_error_string(void);
short e1430_print_errors(short state);
short e1430_init_io_driver(void);
short e1430_create_module_group(int numMods, 
		/*	short   *laArray); */
			int*  laArray);
short e1430_delete_module_group(short groupID);
short e1430_delete_all_module_groups(void);
short e1430_reset_module(int groupID);
short e1430_reset_dsp(short groupID);
short e1430_reset_lbus(short groupID, short state);
short e1430_set_timeout(long timeout); 
short e1430_get_timeout(long *timeout); 
short e1430_set_clock_mode(short groupID, 
              short multiSync, short adcClock, short dspClock);
short e1430_set_clock_master_mode(short la, short state);
short e1430_get_clock_master_mode(short la, short *state);
short e1430_set_adc_clock(short groupID, short adcClock);
short e1430_get_adc_clock(short groupID, short *sourcePtr);
short e1430_set_dsp_clock(short groupID, short dspClock);
short e1430_get_dsp_clock(short groupID, short *sourcePtr);
short e1430_set_multi_sync(short groupID, short state);
short e1430_get_multi_sync(short groupID, short *statePtr);
short e1430_set_sample_clock_freq_la(short la, 
							double freq);
  short e1430_get_sample_clock_freq_la(short la, 
							double *freqPtr);
  short e1430_auto_zero(short groupID);
  short e1430_auto_range(short groupID, double delay);

  short e1430_set_analog_input(short groupID, double range, 
    short coupling, short filter, short inHi, short inLo);

  short e1430_set_range(short groupID, double range);
  short e1430_get_range(short groupID, double *rangePtr);

  short e1430_set_range_la(short la, double range);
  short e1430_get_range_la(short la, double *rangePtr);

  short e1430_set_anti_alias_filter(short groupID, 
							short state);
  short e1430_get_anti_alias_filter(short groupID, 
							short *statePtr);

  short e1430_set_coupling(short groupID, short coupling);
  short e1430_get_coupling(short groupID, 
						short *couplingPtr);

  short e1430_set_input_high(short groupID, short source);
  short e1430_get_input_high(short groupID, 
							short *sourcePtr);

  short e1430_set_input_low(short groupID, short source);
  short e1430_get_input_low(short groupID, 
							short *sourcePtr);

  short e1430_set_input_offset(short la, double offset);
  short e1430_get_input_offset(short la, double *offsetPtr);

/****************** DATA FORMAT *********************/
  short e1430_set_data_format(short groupID, short type, 
			short size, short mode, 
			long blocksize, short append);

  short e1430_set_data_port(short groupID, short port);
  short e1430_get_data_port(short groupID, short *portPtr);

  short e1430_set_data_mode(short groupID, short mode);
  short e1430_get_data_mode(short groupID, short *modePtr);

  short e1430_set_lbus_mode(short la, short mode);
  short e1430_get_lbus_mode(short la, short *modePtr);

  short e1430_set_append_status(short groupID, 
							short append);
  short e1430_get_append_status(short groupID, 
							short *appendPtr);

  short e1430_set_data_type(short groupID, short type);
  short e1430_get_data_type(short groupID, short *typePtr);

  short e1430_set_data_size(short groupID, short size);
  short e1430_get_data_size(short groupID, short *sizePtr);

  short e1430_set_blocksize(short groupID, long size);
  short e1430_get_blocksize(short groupID, long *sizePtr);

  short e1430_set_data_reread(short groupID, short reread);
  short e1430_get_data_reread(short groupID, 
							short *rereadPtr);

/****************** TRIGGER *********************/
  short e1430_set_trigger_mode(short groupID, short source, 
		long delay, double level, short slope);
  short e1430_get_trigger_phase(short la, double *phasePtr);

  short e1430_set_trigger_source(short groupID, 
							short source);
  short e1430_get_trigger_source(short groupID, 
							short *sourcePtr);

  short e1430_set_trigger_slope(short groupID, short slope);
  short e1430_get_trigger_slope(short groupID, 
							short *slopePtr);

  short e1430_set_trigger_level_adc(short groupID, 
							double level);
  short e1430_set_trigger_level_mag(short groupID, 
							double level);
  short e1430_get_trigger_level_adc(short groupID, 
							double *levelPtr);
  short e1430_get_trigger_level_mag(short groupID, 
							double *levelPtr);

  short e1430_set_trigger_delay(short groupID, long delay);
  short e1430_get_trigger_delay(short groupID, 
							long *delayPtr);

  short e1430_get_trigger_bandwidth(short groupID, 
							short *bwPtr);

/****************** MEASUREMENT *********************/

  short e1430_abort_meas(short groupID);
  short e1430_arm_module(short groupID);
  short e1430_trigger_module(short groupID); 

  short e1430_set_center_frequency(short groupID, 
							double freq);
  short e1430_set_center_freq_bits(short groupID, 
							double freq);
  short e1430_get_center_frequency(short groupID, 
							double *freqPtr);

  short e1430_set_span_zoom(short groupID, 
	double centerFreq, double span, short zoom);
  short e1430_get_span(short groupID, double *spanPtr);

  short e1430_get_status(short la, short *statusPtr);

/****************** INTERRUPTS *********************/
  short e1430_set_interrupt(short groupID, short intrNum, 
				short priority, short mask);
  short e1430_set_interrupt_priority(short groupID, 
				short intrNum, short priority);
  short e1430_get_interrupt_priority(short groupID, 
				short intrNum, short *priorityPtr);
  short e1430_set_interrupt_mask(short groupID, 
				short intrNum, short mask);
  short e1430_get_interrupt_mask(short groupID, 
				short intrNum, short *maskPtr);

/****************** DECIMATION FILTER *********************/
  short e1430_set_decimation_filter(short groupID, 
	short level, short state, short output, short tag);

  short e1430_set_decimation_bandwidth(short groupID, 
				short dataBw, short triggerBw);
  short e1430_get_decimation_bandwidth(short groupID, 
							short *bwPtr);

  short e1430_set_decimation_state(short groupID, 
							short state);
  short e1430_get_decimation_state(short groupID,
							short *statePtr);

  short e1430_set_decimation_output(short groupID, 
							short out);
  short e1430_get_decimation_output(short groupID, 
							short *outPtr);

  short e1430_set_decimation_passtag(short groupID, 
							short tag);
  short e1430_get_decimation_passtag(short groupID, 
							short *tagPtr);

/****************** STATE FILE *********************/
  short e1430_save_state_file(short groupID, 
							char   *filename);
  short e1430_restore_state_file(short groupID, 
				char   *filename, short checkla);


/****************** LOW LEVEL *********************/
/*  short *e1430_get_register_address(short la, short offset); */
char* e1430_get_register_address(short la, short offset); 
  void e1430_set_try_recover(long state); 
  short e1430_clear_berr( void );
  short e1430_check_berr( void );

  short e1430_write_register(short groupID, short offset, 
							short data);
  short e1430_write_register_image(short la, short offset, 
							short data);
  short e1430_write_register_card(short la, short offset, 
							short data);
  short e1430_read_register_card(short la, short offset, 
							short *data);
  short e1430_read_register_image(short la, short offset, 
							short *data);

/****************** READ DATA *********************/
  short e1430_read_raw_data(short la, short *buf, 
		long blocksize, short *adcOverload, 
		short *adcError, long *actualCnt);
/*  short e1430_read_float32_data(short la, FLOATSIZ32 *buf,  */
/*		long blocksize, short *adcOverload, */
/*		short *adcError, long *actualCnt);*/
  short e1430_read_float32_data(short la, double *buf,  
		long blocksize, short *adcOverload, 
        	short *adcError, long *actualCnt);
  int e1430_read_float64_data(int la, double *buf, 
		int blocksize, int *adcOverload, 
		int *adcError, long *actualCnt);
  short e1430_get_fifo_block_data_size(short la, 
							long *size);
  short e1430_get_scale_la(short la, double *scalePtr);

  short e1430_total_data_size(short groupID, long *size);
  short e1430_get_fifo_size(short la, long *size);
  short e1430_get_fifo_max_blocksize(short groupID, 
							long *size);
  short e1430_get_fifo_data_point_size(short la, 
							short *size);


/****************** DEBUG *********************/
  void e1430_debug_level(short level);
  short e1430_display_module_state(short groupID);
  short e1430_display_register(short groupID, 
					short offset, short card);
  short e1430_get_module_state(short la, 
						/*aE1430State   *state);*/
						char   *state);
  short e1430_get_dac_error(short la, double *dac1, 
			double *dac2, double *dac3, double *gain);

/****************** DIAGNOSTICS *********************/
  short e1430_diagnostics(short la, short memTestFlag);
  short e1430_test_logical_address(short la);
  short e1430_test_register_access(short la);
  short e1430_test_meas_control(short la);
  short e1430_test_timing_setup(short la);
  short e1430_test_fifo_memory(short la);
  short e1430_test_data_collection(short la);
  short e1430_test_interrupts(short la);
  short e1430_test_trigger(short la);
  short e1430_calibrate(short la);
  /*const char *e1430_get_software_rev(void);*/

  char *e1430_get_software_rev(void);

